package Log_in_test;

import org.openqa.selenium.By;
import org.testng.Assert;
import org.testng.annotations.Test;

import Log_in_test.SuiteInitializer;

public class SmoketasteofSelenium {
  //@Test
  //(priority = 20)
  public void flaseLoginBadCodeExampleForPOM(){
  	  String username = "bigtester";
	  String password = "bigtester";
	  By usernameLocator = By.id("modlgn_username");
	  By passwordLocator = By.id("modlgn_passwd");
	  By loginButtonLocator = By.name("Submit");
	  SuiteInitializer.getDriver().findElement(usernameLocator).sendKeys(username);
	  SuiteInitializer.getDriver().findElement(passwordLocator).sendKeys(password);
	  SuiteInitializer.getDriver().findElement(loginButtonLocator).click();
	  //wait2());
	  Assert.assertTrue(SuiteInitializer.getDriver().getPageSource().contains("Username and password do not match or you do not have an account yet"), "False Login page not appear");
	  System.out.println("False Login page appears");
	  }
	  
}
